<template>
  <div>
    <LazyLoadTab v-model="activeName" :tabMenus="menus"></LazyLoadTab>
  </div>
</template>

<script>
import { saveInfo, getInfo, getStorageList } from '@/api/part/exchange/platform';
export default {
  name: 'ReleaseInfo',
  props: {
    pruchaseInfos: {
      type: Object
    },
    tax: {
      type: Number
    }
  },
  data() {
    return {
      activeName: '出售',
      menus: [
        {
          title: '出售',
          path: 'part/exchange/platform/tabs/sale',
          params: { params: this.pruchaseInfos, tax: this.tax },
          on: {
            closeEvent: this.closeRenovate
          }
        },
        {
          title: '求购',
          path: 'part/exchange/platform/tabs/purchase',
          params: { params: this.pruchaseInfos, tax: this.tax },
          on: {
            closeEvent: this.closeRenovate
          }
        }
      ]
    };
  },
  // created() {
  //   this.getDictList(); //获取初始化数据
  // },
  methods: {
    // 获取初始化数据
    // async getDictList() {
    //   let res = await getStorageList({ currentPage: 1, pageSize: 20 });
    //   console.log('仓库下拉选', res);
    //   this.pruchaseInfos = { ...this.pruchaseInfos, res: res.data };
    //   // console.log('仓库下拉选', this.pruchaseInfos);
    // },
    closeRenovate(val, saleType) {
      // console.log(saleType, '类型');

      this.$emit('close', false, 'refresh', saleType);
    }
  }
};
</script>

<style lang="less" scoped></style>
